export default function (_this) {
    return {
        details: null,
        options: {
            // inline:true,
            labelWidth: "80px",
            // style: { width: "700px" },
            size: "mini",
        },
        items: [
            {
                formItem: { label: "姓名" },
                itemRender: {
                    el: "el-input",
                    placeholder: "请输入姓名",
                    value: "name",
                    style: { width: '220px' }
                },
            },
            {
                formItem: { label: "年龄" },
                itemRender: {
                    el: "el-input-number",
                    label: "请输入年龄",
                    value: "age",
                    min: 1,
                    max: 150,
                },
            },
            {
                formItem: { label: "性别" },
                itemRender: {
                    el: "el-select",
                    placeholder: "请选择性别",
                    value: "gender",
                    options: [],
                    style: { width: '220px' },
                    async query () {
                        setTimeout(() => {
                            this.options = [
                                { label: '男', value: 1 },
                                { label: '女', value: 0 }
                            ]
                        }, 1000);
                    }
                },
            },
            {
                formItem: { label: "出生日期", required: true },
                itemRender: {
                    el: "el-date-picker",
                    placeholder: "选择时间",
                    value: "birthday",
                    type: 'datetime',
                    ['value-format']: "yyyy-MM-dd HH:mm:ss"

                },
            },
            {
                formItem: { label: "区域" },
                itemRender: {
                    el: "el-select",
                    placeholder: "请选择区域",
                    value: "county",
                    options: [],
                    style: { width: '220px' },
                    query () {
                        setTimeout(() => {
                            this.options = [
                                { label: '湖北省 汉川市 城隍镇', value: '湖北省 汉川市 城隍镇' },
                                { label: '吉林省 白城市 洮北区', value: '吉林省 白城市 洮北区' },
                            ]
                        }, 1000);
                    }
                },
            },
        ],
        rules: {
            name: [
                { required: true, message: '请输入姓名', trigger: 'blur' },
                { min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }
            ],
            age: [
                { required: true, message: '请输入年龄', trigger: 'blur' },
            ],
            gender: [
                { required: true, message: '请选择性别', trigger: 'change' }
            ],
            birthday: [
                { required: true, message: '请选择日期', trigger: 'change' }
            ],
            county: [
                { required: true, message: '请选择区域', trigger: 'change' }
            ],
        },
        btns: [
            { submit: false, content: '提交1', type: 'success' },
            { reset: false, content: '重置2' },
            //    {content:'返回', type:'danger',click:()=>{
            //       this.$router.back();
            //    }},
        ]
    }
}